<script src="./script.js"></script>
<style src="./style.scss" lang="scss" scoped></style>
<template>
  <div>
    <web-header></web-header>

    <div class="w content">
      <div class="content-left">
        <ul>
          <li class="selected">我的账户</li>
          <li>订单管理</li>
          <li>收货地址</li>
          <li>消费记录</li>
          <li>修改密码</li>
        </ul>
      </div>
      <div class="line"><div></div></div>
      <div class="content-right">
        <div class="content-title">
          <div>账户余额</div>
        </div>
        <div class="account" v-if="user">
          <label>单位名称：</label>
          <span>雲鼎峰传媒</span>
          <label>账户余额：</label>
          <span class="balance">￥{{ user.balance }}</span>
        </div>
        <div class="content-title">
          <div>余额充值</div>
        </div>
        <div class="charge">
          <div :class="item.id == chargeTypeId ? 'charge-item charge-selected' : 'charge-item'" v-for="item in chargeTypes" @click="chargeTypeId = item.id">
            <span>充值</span>
            <span class="money">￥{{ item.amount }}</span>
            <span>赠送</span>
            <span class="money">￥{{ item.gift_amount }}</span>
          </div>
        </div>

        <div>
          <el-button type="success" @click="pay" :loading="payLoading" style="height: 50px;width: 200px;">微信支付</el-button>
        </div>
      </div>
    </div>

  </div>
</template>
